<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0</TargetFrameworks>
    <TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <NoWarn>$(NoWarn);0618</NoWarn>
    <NoWarn>$(NoWarn);IDE0059;IDE0060;CA1822;CA1865</NoWarn>
    <IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <AddNETFrameworkPlaceholderFileToPackage>true</AddNETFrameworkPlaceholderFileToPackage>
    <AddNETFrameworkAssemblyReferenceToPackage>true</AddNETFrameworkAssemblyReferenceToPackage>
    <PackageDescription>Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure.

Commonly Used Types:
System.Management.ManagementClass
System.Management.ManagementObject
System.Management.SelectQuery</PackageDescription>

    <!-- TODO https://github.com/dotnet/runtime/issues/90400: Annotate for nullable reference types -->
    <Nullable>disable</Nullable>
    <NoWarn>$(NoWarn);nullable</NoWarn>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_SystemManagement</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FreeLibrary.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.FreeLibrary.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GetProcAddress.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.GetProcAddress.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GlobalLock.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.GlobalLock.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LoadLibrary.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.LoadLibrary.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.CoGetObjectContext.cs"
             Link="Common\Interop\Windows\Ole32\Interop.CoGetObjectContext.cs" />
    <Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs"
             Link="Common\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
    <Compile Include="System\Management\ManagementBaseObject.cs" />
    <Compile Include="System\Management\ManagementClass.cs" />
    <Compile Include="System\Management\ManagementDateTime.cs" />
    <Compile Include="System\Management\ManagementEventArgs.cs" />
    <Compile Include="System\Management\ManagementEventWatcher.cs" />
    <Compile Include="System\Management\ManagementException.cs" />
    <Compile Include="System\Management\ManagementNamedValueCollection.cs" />
    <Compile Include="System\Management\ManagementObject.cs" />
    <Compile Include="System\Management\ManagementObjectCollection.cs" />
    <Compile Include="System\Management\ManagementObjectSearcher.cs" />
    <Compile Include="System\Management\ManagementOperationWatcher.cs" />
    <Compile Include="System\Management\ManagementOptions.cs" />
    <Compile Include="System\Management\ManagementPath.cs" />
    <Compile Include="System\Management\ManagementQuery.cs" />
    <Compile Include="System\Management\ManagementScope.cs" />
    <Compile Include="System\Management\Method.cs" />
    <Compile Include="System\Management\MethodSet.cs" />
    <Compile Include="System\Management\Property.cs" />
    <Compile Include="System\Management\PropertySet.cs" />
    <Compile Include="System\Management\Qualifier.cs" />
    <Compile Include="System\Management\QualifierSet.cs" />
    <Compile Include="System\Management\WmiEventSink.cs" />
    <Compile Include="System\Management\wmiutil.cs" />
    <Compile Include="System\Management\WMIGenerator.cs" />
    <Compile Include="System\Management\InteropClasses\WMIInterop.cs" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="$(LibrariesProjectRoot)System.CodeDom\src\System.CodeDom.csproj" />
  </ItemGroup>

</Project>
